﻿namespace CKQDJK {
	using System;
	using SuperORM.Attributes;
	using System.ComponentModel;
	
	
	/// <summary>系统用户</summary>
	[Object("系统用户", "CKQDJK", "系统用户")]
	[Browsable(true)]
	[DisplayName("系统用户")]
	[ReadOnly(false)]
	[Serializable()]
	public class 系统用户 : SuperORM.BusinessObject {
		
		/// <summary>内部变量：用户ID</summary>
		private string m_用户ID;
		
		/// <summary>标示属性用户ID是否为空的字段。</summary>
		private bool m_Is用户IDNull = true;
		
		/// <summary>内部变量：用户名</summary>
		private string m_用户名;
		
		/// <summary>标示属性用户名是否为空的字段。</summary>
		private bool m_Is用户名Null = true;
		
		/// <summary>内部变量：注册日期</summary>
		private System.DateTime m_注册日期;
		
		/// <summary>标示属性注册日期是否为空的字段。</summary>
		private bool m_Is注册日期Null = true;
		
		/// <summary>内部变量：口令</summary>
		private string m_口令;
		
		/// <summary>标示属性口令是否为空的字段。</summary>
		private bool m_Is口令Null = true;
		
		/// <summary>内部变量：BSM</summary>
		private int m_BSM;
		
		/// <summary>标示属性BSM是否为空的字段。</summary>
		private bool m_IsBSMNull = true;
		
		public static string TypeID = "CKQDJK.系统用户";
		
		/// <summary>属性用户ID</summary>
		[Member("用户ID", "用户ID", "System.String", 20, false, false, "用户ID")]
		[Browsable(true)]
		[DisplayName("用户ID")]
		[ReadOnly(false)]
		public string 用户ID {
			get {
				return this.m_用户ID;
			}
			set {
				this.m_用户ID = value;
				this.m_Is用户IDNull = false;
			}
		}
		
		/// <summary>属性用户名</summary>
		[Member("用户名", "用户名", "System.String", 80, false, false, "用户名")]
		[Browsable(true)]
		[DisplayName("用户名")]
		[ReadOnly(false)]
		public string 用户名 {
			get {
				return this.m_用户名;
			}
			set {
				this.m_用户名 = value;
				this.m_Is用户名Null = false;
			}
		}
		
		/// <summary>属性注册日期</summary>
		[Member("注册日期", "注册日期", "System.DateTime", 8, false, false, "注册日期")]
		[Browsable(true)]
		[DisplayName("注册日期")]
		[ReadOnly(false)]
		public System.DateTime 注册日期 {
			get {
				return this.m_注册日期;
			}
			set {
				this.m_注册日期 = value;
				this.m_Is注册日期Null = false;
			}
		}
		
		/// <summary>属性口令</summary>
		[Member("口令", "口令", "System.String", 12, false, false, "口令")]
		[Browsable(true)]
		[DisplayName("口令")]
		[ReadOnly(false)]
		public string 口令 {
			get {
				return this.m_口令;
			}
			set {
				this.m_口令 = value;
				this.m_Is口令Null = false;
			}
		}
		
		/// <summary>属性BSM</summary>
		[Member("BSM", "BSM", true, true, "BSM")]
		[Browsable(true)]
		[DisplayName("BSM")]
		[ReadOnly(false)]
		public int BSM {
			get {
				return this.m_BSM;
			}
			set {
				this.m_BSM = value;
				this.m_IsBSMNull = false;
				if ((this.OnOIDChanged != null)) {
					this.OnOIDChanged(this, null);
				}
			}
		}
		
		/// <summary>对象ID发生变化的时候触发的事件</summary>
		public event SuperORM.Attributes.OIDChangedHandler OnOIDChanged;
		
		/// <summary>属性改变的时候</summary>
		public event SuperORM.PropertyChangeHandler PropertyChanged;
		
		// 重载的方法，判断两个对象是否相等，判断条件是两个对象的主键值是否相等。
		public override bool Equals(object obj) {
			系统用户 系统用户 = ((系统用户)(obj));
			if ((系统用户.BSM == this.m_BSM)) {
				return true;
			}
			else {
				return false;
			}
		}
		
		/// <summary>判断某一个属性是否为空</summary>
		public override bool IsNull(string propname) {
			if (propname.Equals("用户ID")) {
				return this.m_Is用户IDNull;
			}
			if (propname.Equals("用户名")) {
				return this.m_Is用户名Null;
			}
			if (propname.Equals("注册日期")) {
				return this.m_Is注册日期Null;
			}
			if (propname.Equals("口令")) {
				return this.m_Is口令Null;
			}
			if (propname.Equals("BSM")) {
				return this.m_IsBSMNull;
			}
			return true;
		}
		
		/// <summary>将某个属性设置为空</summary>
		public override void SetNull(string propname) {
			if (propname.Equals("用户ID")) {
				this.m_Is用户IDNull = true;
				return;
			}
			if (propname.Equals("用户名")) {
				this.m_Is用户名Null = true;
				return;
			}
			if (propname.Equals("注册日期")) {
				this.m_Is注册日期Null = true;
				return;
			}
			if (propname.Equals("口令")) {
				this.m_Is口令Null = true;
				return;
			}
			if (propname.Equals("BSM")) {
				this.m_IsBSMNull = true;
				return;
			}
		}
	}
}
